<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2011 (http://www.altova.com) by Kalle Launiala (Citrus Solutions Oy) -->
<xs:schema xmlns="http://tempuri.org/Context_v1_0.xsd" xmlns:mstns="http://tempuri.org/Context_v1_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org/Context_v1_0.xsd" elementFormDefault="qualified" id="Context_v1_0">
	<xs:complexType name="ContextType">
		<xs:sequence>
			<xs:element name="Properties" type="PropertiesType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>(Opt) Context design level properties. Can extend with code-only implementation as well.

Properties are standard name-type definitions with optional shortcut feature.</xs:documentation>
				</xs:annotation>
				<xs:key name="PKProperty">
					<xs:selector xpath="Property"/>
					<xs:field xpath="@name"/>
				</xs:key>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="name" use="required">
			<xs:annotation>
				<xs:documentation>Name of the context.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="namespaceName" use="required">
			<xs:annotation>
				<xs:documentation>Namespace of the context.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="instanceHost" use="required">
			<xs:annotation>
				<xs:documentation>Instancehost of the context. Expansion points: Nested contexts hosted within another solution-defined context.</xs:documentation>
			</xs:annotation>
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="Static"/>
					<xs:enumeration value="WCFOperationContext"/>
					<xs:enumeration value="HttpContext"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ContextsType">
		<xs:sequence>
			<xs:element name="Context" type="ContextType" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Context definition.

The context type-specific information is included in the attributes. The property level information is included in the Properties level.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PropertyType">
		<xs:attribute name="name" use="required">
			<xs:annotation>
				<xs:documentation>Property name.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="dataType" use="required">
			<xs:annotation>
				<xs:documentation>Property datatype.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="shortcutPropertyName" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>(Opt) Shortcut property name. When given, the context will have static property generated with the given name such as Context.MyShortcut, shortcut for Context.Active.MyProperty.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="PropertiesType">
		<xs:sequence>
			<xs:element name="Property" type="PropertyType" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Property with standard name-datatype definition.

Optional shortcut feature also provided (setting up a static propertydefinition to the using type).</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ContextAbstraction">
		<xs:annotation>
			<xs:documentation>Contexts are logical "sandboxes" with lifetime. 

Context-aware software architecture can rely on the containing context providing "static-alike" bounded structure for shared data.

One example is object-relational datacontext, that context-aware served will provide centralized storage repository for the lifetime of the entire "beginning-making-committing" changes.

Other example is web/WCF service context, that provides request-specific data storage.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Contexts" type="ContextsType">
					<xs:annotation>
						<xs:documentation>Contexts. Only one type of Context definition is currently required/defined. 

Context type itself includes the type-specific information about the hosting context.</xs:documentation>
					</xs:annotation>
					<xs:key name="PKContext">
						<xs:selector xpath="Context"/>
						<xs:field xpath="@name"/>
					</xs:key>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
